﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EF.Model;
using EF.BLL;

namespace EF.Demo
{
    class Program
    {
        static void Main(string[] args)
        {             
             BlogCategoryService service=new BlogCategoryService();
             //创建博文分类
             BlogCategory cate = service.CreateBlogCategory();
             cate.CateName = "EF分类标签";
             
             //创建一篇博文
             BlogArticle arti = service.CreateBlogArticle();
             arti.Title = "EF进化论";
             arti.Content = "EF测试内容";

             //博文加到博文分类
             cate.BlogArticle.Add(arti);
             //更新
             service.Insert(cate);

             Console.ReadLine();
        }
    }
}
